using System;
using MySql.Data.MySqlClient;
public class SqlConFactory{
    private static string connstr="";
 
    private static MySqlConnection _Conn=new MySqlConnection(connstr);
   
    //修改用户链接
    public static void SetConnection(String connstr){
        _Conn=new MySqlConnection(connstr);
        _Conn.Open();
    }
    //获得一个链接
    public static MySqlConnection GetConnection(){
        return (MySqlConnection)_Conn.Clone();
    }
}